package com.yuw.producerandconsumer;

public class TestDriver {
    public static void main(String[] args) {
        // 创建一个仓库
        MyStack stack = new MyStack(10);
        // 创建生产者消费线程
        Thread threadProducer = new ThreadProducer(stack);
        // 创建消费者消费线程
        Thread threadConsumer = new ThreadConsumer(stack);

        // 启动两个线程
        threadProducer.start();
        threadConsumer.start();
    }
}
